bitkeeper revision 1.1159.1.90 (4124ba96RLXO5OUyP4yBxVBa7NDnUw)
authormjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Thu, 19 Aug 2004 14:35:02 +0000 (14:35 +0000)
committermjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Thu, 19 Aug 2004 14:35:02 +0000 (14:35 +0000)
Allow some more characters in domain names.

tools/python/xen/xend/XendDomainInfo.py

index 5e7bb91b78cb2ad404b82c19308374fc9dc82d3c..309521ef81f99b3f0f496ff07928a8fa197aed13 100644 (file)
@@ -444,7 +444,7 @@ class XendDomainInfo:
 
     def check_name(self, name):
         """Check if a vm name is valid. Valid names start with a non-digit
-        and contain alphabetic characters, digits, or characters in '_-.'.
+        and contain alphabetic characters, digits, or characters in '_-.:/+'.
         The same name cannot be used for more than one vm at the same time.
 
         @param name: name
@@ -457,7 +457,7 @@ class XendDomainInfo:
             raise VmError('invalid vm name')
         for c in name:
             if c in string.digits: continue
-            if c in '_-.': continue
+            if c in '_-.:/+': continue
             if c in string.ascii_letters: continue
             raise VmError('invalid vm name')
         dominfo = domain_exists(name)